package com.quwan.security;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * #jwt
 * jwt:
 * secret: quwan.2021-06-08
 * #token 过期时间 单位:天
 * expiration: 7
 * header: Authorization
 * tokenHead: Bearer
 * route:
 * authentication:
 * refresh: refresh
 */
@Component
@ConfigurationProperties(prefix = "jwt")
@Data
public class JwtProperties {
    private String secret;
    private long expiration;
    private int keepLive;
    private String header;
    private String tokenHead;
    private Authentication route = new Authentication();

    @Data
    public class Authentication {
        private Refresh authentication = new Refresh();
    }

    @Data
    public class Refresh {
        private String refresh;
    }
}
